package com.nine.pattern.proxy.static_proxy;

/**
 * @author nine
 * @version 1.0
 * @description TODO
 * @date 2024-07-04 22:18
 */
public class TestClient {
	public static void main(String[] args) {
		test1();
		test2();
	}

	private static void test2() {
		// 聚合
		// ProxyPoint2 proxyPoint2 = new ProxyPoint2(new TrainStation());
		ProxyPoint2 proxyPoint2 = new ProxyPoint2();
		proxyPoint2.setSellTicket(new TrainStation());
		proxyPoint2.sell();
	}

	private static void test1() {
		// 只需要访问 代理类，不需要直接访问火车站
		ProxyPoint proxyPoint = new ProxyPoint();
		proxyPoint.sell();
	}
}
